package com.cloudfun.campusshare.service;

import com.cloudfun.campusshare.entity.UserEntity;
import com.cloudfun.campusshare.entity.UserRelEntity;

import java.util.Set;

/**
 * Created by Huqin on 2020/5/9
 */
public interface UserRelService {

    /**
     * 创建
     *
     * @param userRelEntity
     */
    void create(UserRelEntity userRelEntity);

    /**
     * 获取所属商户
     *
     * @param userId
     * @return
     */
    UserEntity getUserMerchant(String userId);

    /**
     * 获取所有子账号id集合
     *
     * @param userId
     * @return
     */
    Set<String> getDescendantIds(String userId);

    /**
     * 根据用户Id删除
     *
     * @param id
     */
    void deleteByUserId(String id);
}
